package com.bafa.objects;

import java.util.ArrayList;

public class Message {

	private ArrayList messages = new ArrayList();
	private ArrayList errors = new ArrayList();
	public Message(){
		
	}
	public Message(Message message){
		messages.addAll(message.getMessages());
		errors.addAll(message.getErrors());
	}
	
	public void addAllMessages(Message message){
		messages.addAll(message.getMessages());
		errors.addAll(message.getErrors());
	}
	public void addMessage(String message){
		messages.add(message);
	}
	public void addError(String message){
		errors.add(message);
	}
	
	public int size(){
		return messages.size();
	}
	
	public int errorsSize(){
		return errors.size();
	}
	public String getMessage(int i){
		return (String)messages.get(i);
	}

	public ArrayList getErrors() {
		return errors;
	}

	public void setErrors(ArrayList errors) {
		this.errors = errors;
	}

	public ArrayList getMessages() {
		return messages;
	}

	public void setMessages(ArrayList messages) {
		this.messages = messages;
	}
}
